#include <iostream>
#include <vector>

using namespace std;
using ll=long long;
int main(){
	
	int n,x;
	cin>>n>>x;
	vector<int> vec(n);
	for(int i=0;i<n;++i){
		
		cin>>vec[i];
	}
	int nRetL=n,nRetR=n+n;
	int nLeft=0,nRight=0;
	ll nSum=0;
	while(nRight<n){
		
		nSum+=vec[nRight];
		while(nLeft<=nRight && nSum>=x){
			
			if(nRight-nLeft+1<nRetR-nRetL+1){
				
				nRetR=nRight;
				nRetL=nLeft;
			}
			nSum-=vec[nLeft];
			++nLeft;
		}
		++nRight;
	}
	cout<<nRetL+1<<' '<<nRetR+1<<endl;
	
	return 0;
}
